// 
// DotNetNuke?- http://www.dotnetnuke.com 
// Copyright (c) 2002-2012 
// by DotNetNuke Corporation 
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation 
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and 
// to permit persons to whom the Software is furnished to do so, subject to the following conditions: 
// 
// The above copyright notice and this permission notice shall be included in all copies or substantial portions 
// of the Software. 
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
// DEALINGS IN THE SOFTWARE. 
// 

using System;
using System.Configuration;
using System.Data;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Common.Utilities;

namespace YourCompany.Modules.$safeprojectname$
{

    /// ----------------------------------------------------------------------------- 
    /// <summary> 
    /// The Info class for $safeprojectname$ 
    /// </summary> 
    /// <remarks> 
    /// </remarks> 
    /// <history> 
    /// </history> 
    /// ----------------------------------------------------------------------------- 
    public class $safeprojectname$Info : IHydratable
    {
        #region "Private Members"
        // local property declarations 
        private int moduleId;
        private int itemId;
        private string content;
        private int createdByUser;
        private DateTime createdDate;
        private string createdByUserName;
        private string displayContent;
        private int userId;
        #endregion

        #region "Constructor"
        // initialization 
        /// <summary>
        /// Initializes a new instance of the <see cref="$safeprojectname$Info"/> class.
        /// </summary>
        public $safeprojectname$Info()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="$safeprojectname$Info"/> class.
        /// </summary>
        /// <param name="ModuleId">The module id.</param>
        /// <param name="UserId">The user id.</param>
        public $safeprojectname$Info(int ModuleId, int UserId)
        {
            // TODO: Complete member initialization
            this.ModuleId = ModuleId;
            this.userId = UserId;
        }
        #endregion

        #region "Pulic Properties"
        /// <summary>
        /// Gets or sets the module id.
        /// </summary>
        /// <value>
        /// The module id.
        /// </value>
        public int ModuleId
        {
            get { return moduleId; }
            set { moduleId = value; }
        }

        /// <summary>
        /// Gets or sets the item id.
        /// </summary>
        /// <value>
        /// The item id.
        /// </value>
        public int ItemId
        {
            get { return itemId; }
            set { itemId = value; }
        }

        /// <summary>
        /// Gets or sets the content.
        /// </summary>
        /// <value>
        /// The content.
        /// </value>
        public string Content
        {
            get { return content; }
            set { content = value; }
        }

        /// <summary>
        /// Gets or sets the created by user.
        /// </summary>
        /// <value>
        /// The created by user.
        /// </value>
        public int CreatedByUser
        {
            get { return createdByUser; }
            set { createdByUser = value; }
        }

        /// <summary>
        /// Gets or sets the created date.
        /// </summary>
        /// <value>
        /// The created date.
        /// </value>
        public DateTime CreatedDate
        {
            get { return createdDate; }
            set { createdDate = value; }
        }

        /// <summary>
        /// Gets or sets the name of the created by user.
        /// </summary>
        /// <value>
        /// The name of the created by user.
        /// </value>
        public string CreatedByUserName
        {
            get { return createdByUserName; }
            set { createdByUserName = value; }
        }

        /// <summary>
        /// Gets or sets the display content.
        /// </summary>
        /// <value>
        /// The display content.
        /// </value>
        public string DisplayContent
        {
            get { return displayContent; }
            set { displayContent = value; }
        }

        /// <summary>
        /// Gets or sets the user id.
        /// </summary>
        /// <value>
        /// The user id.
        /// </value>
        public int UserId
        {
            get { return userId; }
            set { userId = value; }
        }
        /// <summary>
        /// Gets or sets the key ID.
        /// </summary>
        /// <value>
        /// The key ID.
        /// </value>
        public int KeyID
        {
            get
            {
                return ItemId;
            }
            set
            {
                ItemId = value;
            }
        }
        #endregion

        #region "Public Methods"
        /// <summary>
        /// Fills the specified dr.
        /// </summary>
        /// <param name="dr">The dr.</param>
        public void Fill(IDataReader dr)
        {
            ItemId = Null.SetNullInteger(dr["ItemId"]);
            ModuleId = Null.SetNullInteger(dr["ModuleId"]);
            Content = Null.SetNullString(dr["Content"]);
            CreatedByUser = Null.SetNullInteger(dr["CreatedByUser"]);
            CreatedByUserName = Null.SetNullString(dr["CreatedByUserName"]);
            CreatedDate = Null.SetNullDateTime(dr["CreatedDate"]);
        }
        #endregion
    }
}